/** list.h -- lab 4 **/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

/** List node  **/
typedef struct node_type
{
   void *objectP;            /* Pointer to associated object  */
   struct node_type *next;   /* Pointer to next node          */
} node_t;

typedef struct list_type
{
   node_t *front;            /* Pointer to front of list      */
   node_t *back;             /* Pointer to end of list        */
   node_t *current;          /* Current list position         */      
} list_t;

/** Function prototypes **/
list_t *createList();           /* Create and initialize list object */
void addObject(list_t *list, void *objPtr); /* Add object to list    */
void *deleteObject(list_t *list, int element);
void resetList(list_t *list);               /* Reset position to head of list    */
void *getObject(list_t *list);  /* Get object from list              */
int  endList(list_t *list);     /* Test for end of list              */
